/*!
    \file  usb_key.h
    \brief usb delay driver header file

    \version 2015-07-15, V1.0.0, demo for GD32F20x
    \version 2017-06-05, V2.0.0, demo for GD32F20x
    \version 2019-04-01, V2.1.0, demo for GD32F20x
*/


#ifndef USB_LED_KEY_H
#define USB_LED_KEY_H

#ifdef   _USB_KEY_MODULE_
#define  MY_EXT
#else
#define  MY_EXT  extern
#endif

#include "stdint.h"

#define LED3          3
#define LED2          2
#define LED1          1

#define KEY_TAMPER      3
#define KEY_USER        7
#define KEY_WAKEUP      0

#define KEY_MODE_GPIO   1

MY_EXT uint8_t usb_led[8];
MY_EXT uint8_t usb_key[8];

void gd_eval_led_init(uint8_t led_pos);
void gd_eval_led_toggle(uint8_t led_pos);
void gd_eval_led_off(uint8_t led_pos);
void gd_eval_led_on(uint8_t led_pos);
void gd_eval_key_init(uint8_t, uint8_t);
uint8_t gd_eval_key_state_get(uint8_t key_pos);

#undef MY_EXT

#endif /* USB_LED_KEY_H */
